// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.core.profiling;

import java.util.Stack;

public class PerformanceProfileProbe extends AbstractPerformanceProfileProbe {
    private final Stack<zombie.GameProfiler.ProfileArea> m_currentArea = new Stack();

    public PerformanceProfileProbe(String name) {
        super(name);
    }

    public PerformanceProfileProbe(String name, boolean isEnabled) {
        super(name);
        this.setEnabled(isEnabled);
    }

    @Override
    protected void onStart() {
        this.m_currentArea.push(zombie.GameProfiler.getInstance().start(this.Name));
    }

    @Override
    protected void onEnd() {
        zombie.GameProfiler.getInstance().end((zombie.GameProfiler.ProfileArea)this.m_currentArea.pop());
    }
}
